Leaflet 地图开发–Leaflet Map Global Switches—全局开关

Leaflet 地图开发–Leaflet Map Global Switches—全局开关

Global switches are created for rare cases and generally make Leaflet to not detect a particular browser feature even if it’s there. You need to set the switch as a global variable to true before including Leaflet on the page, like this:

全局开关是为罕见情况创建的,通常使Leaflet 无法检测特定的浏览器功能,即使它存在。在页面上包含传单之前,需要将开关作为全局变量设置为true,如下所示:

<script>L_NO_TOUCH = true;</script>
<script src="leaflet.js"></script>
Switch Description
L_NO_TOUCH Forces Leaflet to not use touch events even if it detects them.

强制Leaflet 不要使用触摸事件,即使它检测到它们。

L_DISABLE_3D Forces Leaflet to not use hardware-accelerated CSS 3D transforms for positioning (which may cause glitches in some rare environments) even if they’re supported.

强制Leaflet不要使用硬件加速的CSS 3D转换进行定位(这可能会在一些罕见的环境中导致故障),即使它们受到支持。

0 0 投票数
文章评分
订阅评论
提醒
0 评论
最旧
最新 最多投票
内联反馈
查看所有评论
0
希望看到您的想法,请您发表评论x